package com.google.code.cakedroid.base;

import java.util.List;
import java.util.Map;

/**
 *XMLParse interface 
 *If you need to parse xml,it's recommended that your xml-parsing class implements the interface
 *@author androidyue
 *Last Modified:2011-12-12
 */
public interface ParseInterface {
	public final String UTF8="utf-8";
	/**
	 * do specific operations to parse the data
	 */
	public abstract void parseData(String url);
	
	/**
	 * return the subResult related to offset
	 * @param offset  it must be greater than or equals 0.if it's greater than the fullResult'size the value will be replaced with 0
	 * @return subResult related to offset.If offset is greater than fullResult'size ,the first subResult will be returned.
	 * 	if exception occurs ,null will be returned.
	 */
	public Map<String,String> getSubResult(int offset);
	
	/**
	 * get full result
	 * @return full result in List format
	 */
	public List<Map<String,String>> getFullResult();
}
